home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-03-20 | 1.6 KB | 52 lines | [TEXT/ttxt] |
- Custom PicComments/Bottlenecks
-
- This sample groups a bunch of pictures together and
- takes them apart using PicComments and a QuickDraw
- bottleneck procedure. It's an example of how to
- store and retrieve custom PicComments, among other
- things.
-
- Here's how it works:
-
- All pictures are kept in a global structure for easy
- access. Note that I use the same bounds rectangle
- for all the pictures, but this isn't necessary.
- You should make sure that the enclosing picture is
- wide enough to hold all the others though, or else
- you'll get clipping when they're displayed.
-
- The global structure contains:
-
- • The no. of pictures currently stored.
- • The PicHandles for each of those pictures.
- • The last rectangle each picture was drawn
- in. (For erase and redraw procedures.)
-
- First, the app creates some individual pictures of
- various objects. Then it repeatedly groups and
- ungroups them until the user chooses Quit from the
- File menu.
-
- For demonstration purposes, the app moves the pictures
- around as it alternates between grouped and ungrouped
- stages. This just shows the user that we really have
- separate or consolidated pictures, as the case may be.
-
- Good stuff to look for:
-
- • Example of custom PicComment usage with unique
- identifiers.
- {-> CustomPicProc, CompositePictures <-}
-
- • Example of a custom QuickDraw bottleneck procedure
- which works in both GrafPorts and CGrafPorts.
- {-> DisassemblePictures <-}
-
- • Example of finding the deepest device and placing
- a window on it.
- {-> ShowThePicts <-}
-
-
- This sample is a rewrite of the 'DTS Groupies' sample.
-
- ik 3/14/97